<?php
/**
 * 简单仿站模块微站定义
 *
 * @author lee
 * @url http://bbs.we7.cc/
 */
defined('IN_IA') or exit('Access Denied');

class Lee_ffModuleSite extends WeModuleSite {
	
	//商品添加功能
	public function doWebAdmin_add(){
		global $_W,$_GPC;
		load()->func('tpl');
		if(array_key_exists('goods_name',$_GPC)){
			$data = [
				'goods_name'=>$_GPC['goods_name'],
				'goods_num'=>$_GPC['goods_num'],
				'goods_price'=>$_GPC['goods_price'],
				'goods_pic'=>$_GPC['goods_pic'],
				'goods_pic'=>$_GPC['goods_pic'],
				'uniacid' =>$_GPC['__uniacid"'],
				'uid' =>$_GPC['__uid"'],
			];
			if($_GPC['is_hot'] == 'on'){
				$data['is_hot'] = '1';
			}else{
				$data['is_hot'] = '0'; 
			}
			var_dump($data);exit;
			// $res = pdo_insert('ceshi2_goods',$data);
			if($res){
				message('商品添加成功',$this->createWebUrl('Admin_index'));
			}else{
				message('商品添加失败',$this->createWebUrl('refresh'));
			}
		}else{
			include $this->template('goods_add');
		}		
	}
	
	//商城后台管理
	public function doWebAdmin_index(){
		global $_W,$_GPC;
		
		
		
		
		include $this->template('list');
	}

	public function doWebGuizeliebiao1() {
		//这个操作被定义用来呈现 规则列表
	}
	public function doMobileWeizhanyouye() {
		//这个操作被定义用来呈现 微站首页导航图标
	}
	public function doMobileWeizhangerennav() {
		//这个操作被定义用来呈现 微站个人中心导航
	}
	public function doMobileWeizhankjgnnav() {
		//这个操作被定义用来呈现 微站快捷功能导航
	}

}